package lala.base.testcase;

import lala.base.smsend.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class MessageDemo extends Activity implements OnClickListener {
	private Button cButton;
	private EditText msgText;
	private SendMessageTest smt;

	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		this.setContentView(R.layout.sendsms);
		init();

	}

	private void init() {
		// TODO Auto-generated method stub
		this.cButton = (Button) findViewById(R.id.sendButton);
		cButton.setOnClickListener(this);
		this.msgText = (EditText) findViewById(R.id.smscontent);
		this.smt = new SendMessageTest();
	}

	public void onClick(View v) {
		// TODO Auto-generated method stub
		if (v.getId() == R.id.sendButton) {
			Content ct = this.smt.setContent(this.msgText.getText().toString(),
					"18665354721");
			smt.send(ct);
		}
		// Toast.makeText(this, R.string.smsdefault, 10).show();

	}

}
